package com.xm.controller.web;

import com.xm.pojo.Sysuser;
import com.xm.service.SysuserService;
import com.xm.util.JSONMsg;
import com.xm.util.JSONResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description
 * @Author semstouch
 * @Date 2017/4/17
 **/
@Controller
@RequestMapping("/web/index")
public class IndexController {
    @Resource
    private SysuserService sysuserService;


    /**
     * 跳转到首页方法
     * @return
     */
    @RequestMapping(value="/toIndexList")
    public ModelAndView toIndexList(HttpServletRequest request){
        ModelAndView modelAndView=new ModelAndView("indexList");
        Sysuser loginUser=(Sysuser)request.getSession().getAttribute("sysuser");
        modelAndView.addObject("sysuser",loginUser);
        return modelAndView;
    }
}
